import instance from "@/utils/request";

//获取公司列表  /v1/company/index
export function getCompanyList(data) {
    return instance.get(`/moon/index/list?pageNum=${data.pageNum}&pageSize=${data.pageSize}&weekendsClosed=${data.weekendsClosed}&overtimesSituation=${data.overtimesSituation}&socialSecurity=${data.socialSecurity}&companName=${data.companName}&provinceId=${data.provinceId}&cityId=${data.cityId}`, data)
}

//根据名称查询公司  /moon/index/getCompany companName
export function getCompany(data) {
    return instance.get(`/moon/index/getCompany?companName=${data.companName}&pageNum=${data.pageNum}&pageSize=${data.pageSize}`)
}

//获取公司详情  /moon/index/getCompanyInfo id
export function getCompanyInfo(data) {
    return instance.get(`/moon/index/getCompanyInfo/${data}`)
}

//根据id获取公司评论    /moon/index/getReviewsInfo id
export function getReviewsInfo(data) {
    return instance.get(`/moon/index/getReviewsInfo/${data.companId}?pageNum=${data.pageNum}&pageSize=${data.pageSize}`)
}

//发布公司   /api/comment/addCompany  post
export function addCompany(data) {
    return instance.post('/api/comment/addCompany', data)
}

// 获取省市  /moon/index/address   get
export function address() {
    return instance.get(`/moon/index/address`)
}

// 获取职位  /moon/index/zhiWei Post
export function zhiWei() {
    return instance.get('/moon/index/zhiWei')
}

// 发布评论 /api/comment/addReviews  post
export function addReviews(data) {
    return instance.post('/api/comment/addReviews', data)
}

// 获取热门城市  /moon/index/getPopular
export function getPopular() {
    return instance.get('/moon/index/getPopular')
}
